/**
 * 物联控制
 * @author xiaoxujs
 */

import { basicIp, newHttpService } from "../../../api/http"
import { IBaseBarrierConfigUpdateParams } from "../../../type/wulian";

// 入矿闸道配置
export const getBaseBarrierConfigList = () => {
    const url = basicIp  + '/base/barrierConfig/list';
    return newHttpService.getData(url)
}
// 编辑设备参数
export const postBaseBarrierConfigUpdate = (data: IBaseBarrierConfigUpdateParams) => {
    const url = basicIp + '/base/barrierConfig/update';
    return newHttpService.postData(url, data)
}
//   手动抬杆
export const getBaseBarrierConfigLift = (data: {id: string}) => {
    const url = basicIp + '/base/barrierConfig/lift';
    return newHttpService.getData(url, data)
}
//   手动落杆
export const getBaseBarrierConfigFalling = (data: {id: string}) => {
    const url = basicIp + '/base/barrierConfig/falling';
    return newHttpService.getData(url, data)
}
// 获取门岗流程开启关闭
export const getBaseBarrierConfigGetIsStart = () => {
    const url = basicIp + '/base/barrierConfig/getIsStart';
    return newHttpService.getData(url)
}
// 设置门岗流程开启关闭
export const getBaseBarrierConfigIsStop = (data: {type: 0 | 1}) => {
    const url = basicIp + '/base/barrierConfig/isStop';
    return newHttpService.getData(url, data)
}
